{include file="common/mainHead"/}
 <script type="text/javascript" src="__STATIC__/js/jquery.2.1.1.min.js"></script>
     <script type="text/javascript" src="__STATIC__/js/webuploader.js"></script>
    <script type="text/javascript" src="__STATIC__/js/upload.js"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/js/webuploader.css" />
  <link rel="stylesheet" type="text/css" href="__STATIC__/js/style.css" />
      <script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>

    <script>
          window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
         window.onload=function (){
             window.UEDITOR_CONFIG.initialFrameWidth="null"; 
            window.UEDITOR_CONFIG.initialFrameHeight=400;
             UE.getEditor('myEditor');
         }
</script>

   <script>
   	var load="__URL__/upload";
   	
       
         
</script>

<div class="admin-main fadeInUp animated" ng-app="hd" ng-controller="ctrl">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>添加奖品</legend>
    </fieldset>
    <form class="layui-form layui-form-pane" action="{:url('edit')}" method="post" id="form1">
    	
        
      <input name="id" type="hidden" value="{$data.id}" />
       
        <div class="layui-form-item">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-4">
                <input type="text" name="name" value="{$data.name}" lay-verify="required" placeholder="标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品描述</label>
            <div class="layui-input-4">
                <input type="text" name="desc" value="{$data.desc}" lay-verify="required" placeholder="描述" class="layui-input">
            </div>
        </div>
        
         <div class="layui-form-item">
            <label class="layui-form-label">中奖概率</label>
            <div class="layui-input-4">
                <input type="text" name="gailv" value="{$data.gailv}" lay-verify="required" placeholder="中奖概率" class="layui-input">
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-4">
                <input type="text" name="sort" value="{$data.sort}" lay-verify="required" placeholder="排序" class="layui-input">
            </div>
        </div>
     
     
        
   
        
        
        
          
        
        
        
        
        
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
                <a href="{:url('index')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>
            </div>
        </div>
       
    </form>
</div>
{include file="common/mainFoot"/}
<script src="__STATIC__/js/angular.min.js"></script>
  <script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
    <script type="text/javascript" src="__STATIC__/js/webuploader.js"></script>
    <script type="text/javascript" src="__STATIC__/js/upload.js"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/js/webuploader.css" />
  <link rel="stylesheet" type="text/css" href="__STATIC__/js/style.css" />
  
<script>
	
	
	

	  var m = angular.module('hd',[]);
    m.controller('ctrl',['$scope',function($scope) {
    
        layui.use(['form', 'layer','layedit','upload'], function () {
            var form = layui.form(), layer = layui.layer,layedit = layui.layedit;
    



         

            form.on('submit(submit)', function (data) {
            


     $('#form1').submit();


            })
        });
    }]);
	
	
	
	
</script>